package git.soulbgm.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.web.bind.annotation.*;
import git.soulbgm.common.pojo.TableDataInfo;
import git.soulbgm.pojo.LogInfo;
import git.soulbgm.service.LogInfoService;
import git.soulbgm.common.base.BaseController;

import java.util.List;

/**
 * 日志信息表控制器
 *
 * @author SoulBGM
 * @date 2022-11-18 14:33:49
 */
@RestController
@RequestMapping("logInfo")
public class LogInfoController extends BaseController {

    private final LogInfoService service;

    public LogInfoController(LogInfoService service) {
        this.service = service;
    }

    @GetMapping("list")
    public TableDataInfo list(LogInfo info) {
        startPage();
        List<LogInfo> list = service.list(new QueryWrapper<>(info));
        return getDataTable(list);
    }

}
